<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        body{
            padding:0;
            margin:0;
        }
        .box{
            display:none;
            width: 200px;
            height: 124px;
            margin:50px auto;
            position:relative;
        }
        button{

            padding:0;
            margin:0;
            width: 20px;
            height: 20px;
            font:18px/20px  iconfont;
            text-align:center;
            position:absolute;
            right:0;
            top:0;
        }
    </style>
</head>
<body>
<div class="box">
    <img src="../素材/Mike.jpg" alt="">
    <button>×</button>
</div>
<script>
    var box=document.getElementsByClassName("box")[0];
    var btn=box.getElementsByTagName("button")[0];
    var timer1=null;
    var timer2=null;
    setTimeout(function(){
        box.style.display="block";
        setTimeout(function(){
            box.style.display="none";
        },3000)
    },2000);
    btn.onclick=function(){
        box.style.display="none";
    }
</script>
</body>
</html>